package com.ouc.openplatform.ouc.authManage.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.ouc.openplatform.ouc.authManage.dto.NJ_LogDTO;
import com.ouc.openplatform.ouc.authManage.model.NJ_Log;
import com.ouc.openplatform.ouc.authManage.service.NJ_ClientLogService;
import com.ouc.openplatform.ouc.authManage.service.NJ_LogService;
import com.ouc.openplatform.utils.PropertyCopy;

public class NJ_ClientLogServiceImpl implements NJ_ClientLogService {
	private NJ_LogService logService;

	public NJ_LogService getLogService() {
		return logService;
	}

	public void setLogService(NJ_LogService logService) {
		this.logService = logService;
	}

	@Override
	public List<NJ_LogDTO> getAllLog() throws Exception {
		List<NJ_LogDTO> allLogDto=new ArrayList<NJ_LogDTO>();
		List<NJ_Log> allLog = logService.getAllLog();
		PropertyCopy.copyProperties(allLog, allLogDto);
		return allLogDto;
	}

	@Override
	public int saveLog(NJ_LogDTO logDTO) {
		return logService.saveLog(logDTO);
	}

	@Override
	public int deleteLog(int id) {
		int flag = logService.deleteLog(id);
		return flag;
	}

	@Override
	public int updateLog(NJ_LogDTO logDTO) {
		int flag = logService.updateLog(logDTO);
		return flag;
	}
}
